<extend name="Layout:layout_content" />
<block name="body_main"> 
    <ul class="xsui-breadcrumb">
        <li><a href="{:U('Channel/channel_list')}"><i  class="fa fa-home fa-fw"></i>站点栏目</a></li>
        <li><a href="{:U('Documents/document_list','category_id='.$data['category_id'])}">文章管理</a></li>
        <li class="current">内容</li>
    </ul>
    <h3 class="htitle">{$meta_title}</h3>
    <form action="{:U('document_edit_save')}" method="post" class="xsui-form" enctype="multipart/form-data" style="min-width:800px; max-height: 340px; overflow: auto;">
        <fieldset>
            <div class="xsui-form-field">
                <label>标题：</label>
                <input type="text" name="title" placeholder="标题" value="{$data.title}" size="80" required="required" />
            </div>
            <div class="xsui-form-field">
                <label>类别：</label>
                <select name="category_id" data-url="{:U('Channel/get_channel_tree_json','type_name=document-list')}" data-value="{$data.category_id}"></select>
                <label>作者：</label>
                <input type="text" name="author" value="{$data.author}"  placeholder="作者" />
                <label>图片：</label>
                <sohtml:file name="picture_url" value="{$data.picture_url}" />
            </div>
            <div class="xsui-form-field">
                <label>来源：</label>
                <input type="text" name="source" value="{$data.source}" placeholder="来源" size="80" />
            </div>
            <div class="xsui-form-field">
                <label>摘要：</label>
                <input type="text" name="summary" placeholder="摘要内容" value="{$data.summary}" size="76" required="required" />
                <!--<textarea name="summary" placeholder="摘要内容" cols="90" rows="3" style="width:99%">{$data.summary}</textarea>-->
            </div>
            <div class="xsui-form-field-vertical">
                <label>正文内容：</label>
                <textarea name="content" class="xsui-editor" cols="90" rows="6" style="width:99%">{$data.content}</textarea>
            </div>
            <div class="xsui-form-field">
                <label>发布时间：</label>
                <input type="text" name="create_time" value="{$data.create_time|default=date('Y-m-d H:i:s')}" placeholder="发布时间" class="datetimepicker" />
                <label style="margin-left:20px;">状态：</label>
                <sohtml:radio name="status" items="1:显示;0:隐藏" value="{$data.status|default=1}" required="required" />
            </div>
        </fieldset>
        <button type="submit" class="ui-state-default"><i class="fa fa-save"></i>发布</button>
        <button type="reset" class="ui-state-default">重置</button>
        <input type="hidden" name="id" value="{$data.id}"/>
        <input type="hidden" name="site_id" value="{$data.site_id}"/>
        <input type="hidden" name="user_name" value="{$data.user_name}"/>
    </form>
</block>
<block name="body_after">
    <script>
        $(function () {
            ajax_combobox({selector: 'select[name="category_id"]', def_option: '请选择类别'});
        })
    </script>
</block>